//
// Created by wze-zero on 2024/7/8 008.
//
#include <iostream>

using namespace std;

int main() {
    int a, b;
    cin >> a;
    cin >> b;
    if (a > b) {
        cout << a + b << " " << a - b << " " << a * b << " " << a / b << " " << a % b << endl;
    } else {
        cout << a + b << " " << b - a << " " << a * b << " " << b / a << " " << b % a << endl;
    }
    return 0;
}
